﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Color.aspx.cs" Inherits="Jy123.Web.Manage.Color" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>管理颜色</title>
    <link href="css/custom/jquery.ui.css" rel="stylesheet" type="text/css" />
    <link href="css/main.css" rel="stylesheet" type="text/css" />
    <link href="css/colorpicker.css" rel="stylesheet" type="text/css" />

    <script src="js/jquery.js" type="text/javascript"></script>

    <script src="js/jquery.ui.js" type="text/javascript"></script>

    <script src="js/colorpicker.js" type="text/javascript"></script>

    <script src="js/main.js" type="text/javascript"></script>

    <script type="text/javascript" language="javascript">
    $(function() {
        $('#picker').farbtastic('#'+'<%=colorValueTextBox.ClientID %>')
    });
    </script>

</head>
<body>
    <h4>
        <a href="#"><span>颜色管理</span></a></h4><div id="picker">
                    </div>
    <form id="colorForm" runat="server">
    <div class="register" id="colorDiv" runat="server">
        <ul class="bb fl" id="noBigTypeSpan" runat="server" visible="false">
            <li><span class="warning">请在大类别管理页面添加名为颜色的大类别</span></li>
        </ul>
        <h5>
            颜色名称
        </h5>
        <ul class="bb">
            <li>
                <asp:TextBox ID="colorNameTextBox" runat="server" MaxLength="20" CssClass="text"></asp:TextBox>
            </li>
            <li>
                <asp:RequiredFieldValidator ID="colorNameRequired" CssClass="warning" runat="server"
                    ControlToValidate="colorNameTextBox" ErrorMessage="请填写颜色名称" Display="Dynamic"
                    ForeColor=""></asp:RequiredFieldValidator>
            </li>
        </ul>
        <h5>
            颜色值
        </h5>
        <ul class="bb">
            <li>
                <input type="text" readonly="readonly" class="color" id="colorValueTextBox" runat="server" /></li>
        </ul>
        <ul class="bb">
            <li>
                <asp:HiddenField ID="actionTypeHidden" runat="server" Value="Add" />
                <asp:HiddenField ID="idHidden" runat="server" />
                <asp:Button ID="SaveButton" runat="server" CssClass="button" Text="保存" OnClick="Save" />
            </li>
        </ul>
        <ul class="bb">
        </ul>
    </div>
    <asp:Repeater ID="colorRepeater" runat="server" Visible="false" OnItemDataBound="Repeater_DataBound"
        OnItemCommand="Repeater_Command">
        <HeaderTemplate>
            <table class="tblist">
                <tr>
                    <th>
                        颜色名称
                    </th>
                    <th>
                        颜色值
                    </th>
                    <th>
                        颜色图像
                    </th>
                    <th>
                    </th>
                </tr>
        </HeaderTemplate>
        <ItemTemplate>
            <tr>
                <td>
                    <asp:HiddenField ID="idHidden" runat="server" />
                    <asp:Label ID="colorNameLabel" runat="server"></asp:Label>
                </td>
                <td>
                    <asp:Label ID="colorValueLabel" runat="server"></asp:Label>
                </td>
                <td>
                    <asp:Label ID="colorImageLabel" CssClass="color" runat="server" Width="40px"></asp:Label>
                </td>
                <td>
                    <asp:LinkButton ID="EditButton" runat="server" CssClass="btnsty" CausesValidation="false"
                        CommandName="Edit" Text="修改" />
                    <asp:LinkButton ID="DeleteButton" runat="server" CssClass="btnsty cred" CausesValidation="false"
                        CommandName="Delete" Text="删除" OnClientClick="return confirm('确定删除？')" />
                </td>
            </tr>
        </ItemTemplate>
        <FooterTemplate>
            </table>
        </FooterTemplate>
    </asp:Repeater>
    </form>
</body>
</html>
